﻿@using CubicFWNet.Data.ViewModal
@*@model CubicFWNet.Data.Models.FinanceCost*@
@model ProductTechnologyView
@{
    //ViewBag.Title = "核算查询";
    var fc = ViewBag.FinanceCost as CubicFWNet.Data.Models.FinanceCost;
    var operationTime = ViewBag.OperationTime;
}
<section class="content-header">
    <h1>
        核算查询
    </h1>
    <ol class="breadcrumb">
        <li><a href="javascript:void(0);"><i class="fa fa-dashboard"></i>@Resources.Global.PageTitle</a></li>
        <li><a href="@Url.Action("Index", "Home")">首页</a></li>
        <li class="active"><a href="@Url.Action("QueryOrder", "FinanceCost")">订单查询</a></li>
    </ol>
</section>
<section class="content">
    <div class="box box-solid">
        <!-- /.box-header -->
        <div class="box-body">
            <div class="row">
                <form class="form-horizontal" id="frmedit" action="@Url.Action("AddCheck", "FinanceCost")" method="post">
                    <div class="box-body">
                        @if (Model != null)
                        {
                            <div class="col-md-12" style="border-bottom: 1px solid #ccc; margin-top: 8px;">
                                <div class="form-group col-md-4">
                                    <label class="col-sm-5 control-label">产品名称</label>
                                    <div class="col-sm-7" style="padding-top: 7px; margin-bottom: 0;">
                                        <a href="javascript:void(0)" class="productinfo" data-id="@Model.ProductId">@Model.ProductName</a>
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-5 control-label">工艺</label>
                                    <div class="col-sm-7" style="padding-top: 7px; margin-bottom: 0;">
                                        <a href="javascript:void(0)" class="technologyinfo" data-id="@Model.TechnologyId">查看工艺</a>
                                    </div>
                                </div>
                                <div class="form-group col-md-4">
                                    <label class="col-sm-5 control-label">数量</label>
                                    <div class="col-sm-7" style="padding-top: 7px; margin-bottom: 0;">
                                        <span class="productinfo" data-id="@Model.ProductId">@Model.Amount</span>
                                    </div>
                                </div>
                                @*<div class="form-group col-md-4" style="display:none">
                                        <label class="col-sm-5 control-label">产品价格</label>
                                        <div class="col-sm-7" style="padding-top: 7px;margin-bottom: 0;">
                                            <span class="productinfo" data-id="@Model.ProductId">@Model.Price</span>
                                        </div>
                                    </div>*@
                                @*<div class="form-group col-md-3">
                                        <label class="col-sm-5 control-label">产品工艺</label>
                                        <div class="col-sm-7" style="padding-top: 7px;margin-bottom: 0;">
                                            <a href="javascript:void(0)" class="technologyinfo" data-id="@item.TechnologyId">@Html.DisplayFor(modelItem => item.ProductName)@Html.Raw("工艺")</a>
                                        </div>
                                    </div>*@
                            </div>
                        }
                        <div class="form-group col-md-12" style="height: 1px;"></div>
                        @if (null != fc)
                        {
                            <div id="json-content">
                                @if (Model != null && Model.DistributeType == 1)
                                {
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">检验人工-元/分钟</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="TestWork" name="TestWork" value="@fc.TestWork" data-des="检验人工-元/分钟" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">管理费用-元/分钟</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="ManageWork" name="ManageWork" value="@fc.ManageWork" data-des="管理费用-元/分钟" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">操作人工-元/分钟</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="OperateWork" name="OperateWork" value="@fc.OperateWork" data-des="操作人工-元/分钟" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">设备 工具 折旧-元/分钟</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="ToolWork" name="ToolWork" value="@fc.ToolWork" data-des="设备 工具 折旧-元/分钟" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">销售费用-元/分钟</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="SalesWork" name="SalesWork" value="@fc.SalesWork" data-des="销售费用-元/分钟" readonly="readonly"/>
                                        </div>
                                    </div>
                                    @*<div class="form-group col-md-12" style="height: 1px;"></div>*@
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">成本价格</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="PriceConfirm" name="PriceConfirm" value="@fc.PriceConfirm" data-des="成本价格" readonly="readonly"/>
                                        </div>
                                    </div>
                                    <div class="form-group col-md-12" style="height: 1px;"></div>
                                }
                                else
                                {
                                    <div class="form-group col-md-6">
                                        <label class="col-sm-3 control-label">成本价格</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control okeydown" id="PriceConfirm" name="PriceConfirm" value="@fc.PriceConfirm" data-des="成本价格" readonly="readonly" />
                                        </div>
                                    </div>
                                    <div class="form-group col-md-12" style="height: 1px;"></div>
                                }
                            </div>
                            <div class="form-group col-md-6">
                                <label for="operationName" class="col-sm-3 control-label">操作人</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="operationName" name="operationName" value="@fc.CreatorName" readonly="readonly">
                                </div>
                            </div>
                            <div class="form-group col-md-6">
                                <label for="operationTime" class="col-sm-3 control-label">日期</label>
                                <div class="col-sm-9">
                                    <input type="text" class="form-control" id="operationTime" name="operationTime" value="@operationTime" readonly="readonly">
                                </div>
                            </div>
                        }
                    </div>
                    <div class="box-footer" style="width: 80%; margin-left: 20px;">
                        <a role="button" href="@Url.Action("QueryOrder", "FinanceCost")" class=" btn btn-primary submitbtn">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
<div id="loadingPage" style="display: none;">
    <div class="loading-shade"></div>
    <div class="loading-content" onclick="$.loading(false)">数据加载中，请稍后…</div>
</div>

<style>
    .has-error {
        border-color: #dd4b39;
        box-shadow: none;
    }
</style>


@section Scripts{
    <script type="text/javascript">
        $(".productinfo").click(function () {
            var id = $(this).data('id');
            var options = {
                id: null,
                title: '产品信息',
                width: "100%",
                height: "100%",
                url: "../Product/Info?PID=" + id,
                shade: 0.3,
                btn: ['返回'],
                btnclass: ['btn btn-danger'],
                callBack: null
            }
            $.modalOpen(options);
        });
        $(".technologyinfo").click(function () {
            var id = $(this).data('id');
            var options = {
                id: null,
                title: '产品信息',
                width: "100%",
                height: "100%",
                url: "../Technology/TechnologyInfo?tId=" + id,
                shade: 0.3,
                btn: ['返回'],
                btnclass: ['btn btn-danger'],
                callBack: null
            }
            $.modalOpen(options);
        });
    </script>
}